<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<style type="text/css">
.dateWidth1{
   width:195px;
}
.select_width{
   width:130px;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<input type="hidden" name="organizations/organization[0]/sequence_no" value="1" >
<input type="hidden" name="organizations/organization[0]@submit_org" value="1" >
<input type="hidden" name="organizations/organization[0]/org_code" value="<x:out select="$xmlData/data/organizations/organization[@submit_org=1]/org_code"/>" >

<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo"
	cellspacing="1">
	<tr class="li_1">
		<td   colspan="4" class="t_bar2">基本信息</td>	
	</tr>
	<tr class="li_2">
		<td   align="right" width="20%"><span class="color_red">*</span>项目名称：</td>
		<td  colspan="3">
			<input id="zh_title" name="proposal/zh_title" label="项目名称" type="text" required class="input_css required maxlength:100"  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title" />"/> 
		</td>
	</tr>
	<tr class="li_1">
		<td   align="right" width="20%">项目类别：</td>
		<td  colspan="3">
			<x:out select="$xmlData/data/proposal/grant_name" /> 
		</td>
	</tr>
	<tr class="li_2">
		<td   align="right" width="20%"><span class="color_red">*</span>项目实施地点：</td>
		<td  colspan="3">
			<input name="proposal/address" label="项目实施地点" type="text" required class="input_css required"  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/address" />"/> 
		</td>
	</tr>
	<tr class="li_1">
	<td align="right"><span class="color_red">*</span>研发形式：</td>
	<td nowrap  colspan="3" valign="middle">
	<label> <input type="radio" class="do " id="advant_01" style="vertical-align: middle;" name="research" label="独立研发" value="01" /><span style="vertical-align: middle;">独立研发</span></label> 
	<label> <input type="radio" class="do " id="advant_02" style="vertical-align: middle;" name="research" label="合作研发" value="02" /><span style="vertical-align: middle;">合作研发</span></label> 
	<label> <input type="radio" class="do " id="advant_03" style="vertical-align: middle;" name="research" label="引进消化吸收研发" value="03" /><span style="vertical-align: middle;">引进消化吸收研发</span></label>
	<label> <input type="radio" class="do " id="advant_04" style="vertical-align: middle;" name="research" label="其他" value="04" /><span style="vertical-align: middle;">其他</span></label>
	<input type="hidden" name="proposal/research_value" id="research_value" class="required" value="<x:out select="$xmlData/data/proposal/research_value" />" label="研发形式" /> 
	<input type="hidden" name="proposal/research_name" id="research_name" value="<x:out select="$xmlData/data/proposal/research_name" />" label="研发形式" /></td>
	</tr>
	<tr class="li_2">
	<td  align="right" nowrap><span class="color_red">*</span>申报领域：</td>
	<td colspan="3">
	       <c:set var="statYear">${statYear}</c:set>
			 <c:if test="${empty statYear}">
			<c:set var="statYear"><x:out select="$xmlData/data/proposal/stat_year" /></c:set>
				</c:if>
			 <c:set var="grantCode"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
			 <%--
			<c:set var="domain_value"><x:out select="$xmlData/data/proposal/domain_value" /></c:set>
			<cpt:checkbox key="grant_domain" name="domain" repeatColumn="4"  sqlParamVal="{'grant_code':'${grantCode}'}"></cpt:checkbox>
			<input type="hidden" name="proposal/domain_value" class="required"  value="${domain_value}" label="申报领域">
			<input type="hidden" name="proposal/domain_name" value="<x:out select="$xmlData/data/proposal/domain_name" />"> --%>
			
			<c:set var="sub"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>
			<c:set var="domain">{'id':'<x:out select="$xmlData/data/proposal/domain_value" />','name':'<x:out select="$xmlData/data/proposal/domain_name" />'}</c:set>
          	<cpt:tree key="domain1" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${domain}"  label="申报领域"
          		id="domain" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue3" sqlParamVal="{grant_code:	${sub},stat_year:${statYear}}"/>
	        <input id="domain_value" type="hidden" name="proposal/domain_value" class="required" label="申报领域" value="<x:out select="$xmlData/data/proposal/domain_value" />"/>
            <input id="domain_name" type="hidden" name="proposal/domain_name"  value="<x:out select="$xmlData/data/proposal/domain_name" />"/>
	</td>
	</tr>
	<tr class="li_1">
	<td align="right"><span class="color_red">*</span>学科名称：</td>
   <td  colspan="3">
          	<c:set var="subject">{'id':'<x:out select="$xmlData/data/proposal/subject_code" />','name':'<x:out select="$xmlData/data/proposal/subject_name" />'}</c:set>
          	<cpt:tree key="medically" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${subject}"  label="学科名称"
          		id="subject" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2"/>
	        <input id="subject_code" type="hidden" name="proposal/subject_code" class="required" label="学科名称" value="<x:out select="$xmlData/data/proposal/subject_code" />"/>
            <input id="subject_name" type="hidden" name="proposal/subject_name"  value="<x:out select="$xmlData/data/proposal/subject_name" />"/>
   </td>
	</tr>
	<tr class="li_2">
		<td align="right"><span class="color_red">*</span>归口管理部门：</td>
		<td colspan="3">
			<c:set var="recomend_org"><x:out select="$xmlData/data/proposal/recomend_org_value" /></c:set>
			<c:set var="sqOrgCode"><x:out select="$xmlData/data/organizations/organization[@submit_org=1]/org_code"/></c:set>
			<cpt:select id="recomend_org" sqlParamVal="{currentorgcode:${sqOrgCode }}"  key="proposal_tjbm"  value="${recomend_org}" onChange="initControlValue(this.id);"></cpt:select>
			<input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value" class="required" value="${recomend_org}" label="归口管理部门">
			<input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
		</td>
	</tr>
	<tr class="li_1">
	<td align="right"><span class="color_red">*</span>曾列入何种科技计划：</td>
	<td nowrap  colspan="3" valign="middle">
	<label> <input type="checkbox" class="do " id="advant_01" style="vertical-align: middle;" name="technologytype" label="“863”计划" value="01" /><span style="vertical-align: middle;">“863”计划&nbsp;&nbsp;&nbsp;</span></label> 
	<label> <input type="checkbox" class="do " id="advant_02" style="vertical-align: middle;" name="technologytype" label="“973”计划" value="02" /><span style="vertical-align: middle;">“973”计划&nbsp;&nbsp;&nbsp;</span></label> 
	<label> <input type="checkbox" class="do " id="advant_03" style="vertical-align: middle;" name="technologytype" label="科技支撑计划" value="03" /><span style="vertical-align: middle;">科技支撑计划&nbsp;&nbsp;&nbsp;</span></label>
	<label> <input type="checkbox" class="do " id="advant_05" style="vertical-align: middle;" name="technologytype" label="其他" value="04" /><span style="vertical-align: middle;">其他</span></label>
	<input type="hidden" name="proposal/technologytype_value" id="technologytype_value" class="required" value="<x:out select="$xmlData/data/proposal/technologytype_value" />" label="曾列入何种科技计划" /> 
	<input type="hidden" name="proposal/technologytype_name" id="technologytype_name" value="<x:out select="$xmlData/data/proposal/technologytype_name" />" label="曾列入何种科技计划" /></td>
	</tr>
	<tr class="li_2">
	<td  align="right" nowrap><span class="color_red">*</span>开始日期：</td>
		<td >
			<c:set var="start_date"><x:out select="$xmlData/data/proposal/start_date" /></c:set>
			<cpt:date id="start_date" name="proposal/start_date" value="${start_date}" className="required date  dateCompare:end_date" label="项目开始日期" ></cpt:date> 
		</td>
		<td  align="right" nowrap width="120px;"><span class="color_red">*</span>结束日期：</td>
		<td>
			<c:set var="end_date"><x:out select="$xmlData/data/proposal/end_date" /></c:set>
			<cpt:date id="end_date" name="proposal/end_date" className="required date" label="项目结束日期"  value="${end_date}" ></cpt:date> 
		</td>
	</tr>
	<tr class="li_1">
	    <td  align="right" nowrap width="20%"><span class="color_red">*</span>申报日期：</td>
		<td colspan="3">
			<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
			<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date" label="申报日期"></cpt:date> 
		</td>
	</tr>
	</table>
<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="org3">
	<tr style="display:none"></tr>
<tr>
		<td align="center" style="padding-left: 20px" width="53%"><span class="color_red">*</span>是否为曾列入政府间国际科技合作议定书项目</td>
		<td align="center">
		<label> <input type="radio" class="do " id="advant_01" style="vertical-align: middle;" name="shiorfor1" label="是" value="01" /><span style="vertical-align: middle;">是</span></label> 
	    <label> <input type="radio" class="do " id="advant_02" style="vertical-align: middle;" name="shiorfor1" label="否" value="02" /><span style="vertical-align: middle;">否</span></label> 
	    <input type="hidden" name="proposal/shiorfor1_value" id="shiorfor1_value" class="required" value="<x:out select="$xmlData/data/proposal/shiorfor1_value" />" label="是否为曾列入政府间国际科技合作议定书项目" /> 
	    <input type="hidden" name="proposal/shiorfor1_name" id="shiorfor1_name" value="<x:out select="$xmlData/data/proposal/shiorfor1_name" />"  />
		</td>
	</tr>
	<tr>
		<td align="center" style="padding-left: 20px"><span class="color_red">*</span>是否曾列入科技部重大国际合作专项（含对俄专项）</td>
		<td align="center">
		<label> <input type="radio" class="do " id="advant_01" style="vertical-align: middle;" name="shiorfor2" label="是" value="01" /><span style="vertical-align: middle;">是</span></label> 
	    <label> <input type="radio" class="do " id="advant_02" style="vertical-align: middle;" name="shiorfor2" label="否" value="02" /><span style="vertical-align: middle;">否</span></label> 
	    <input type="hidden" name="proposal/shiorfor2_value" id="shiorfor2_value" class="required" value="<x:out select="$xmlData/data/proposal/shiorfor2_value" />" label="是否曾列入科技部重大国际合作专项（含对俄专项）" /> 
	    <input type="hidden" name="proposal/shiorfor2_name" id="shiorfor2_name" value="<x:out select="$xmlData/data/proposal/shiorfor2_name" />"  />
		</td>
	</tr>
	<tr>
		<td align="center" style="padding-left: 20px"><span class="color_red">*</span>申请单位是否曾列入科技部国际合作基地</td>
		<td align="center">
		<label> <input type="radio" class="do " id="advant_01" style="vertical-align: middle;" name="shiorfor3" label="是" value="01" /><span style="vertical-align: middle;">是</span></label> 
	    <label> <input type="radio" class="do " id="advant_02" style="vertical-align: middle;" name="shiorfor3" label="否" value="02" /><span style="vertical-align: middle;">否</span></label> 
	    <input type="hidden" name="proposal/shiorfor3_value" id="shiorfor3_value" class="required" value="<x:out select="$xmlData/data/proposal/shiorfor3_value" />" label="申请单位是否曾列入科技部国际合作基地" /> 
	    <input type="hidden" name="proposal/shiorfor3_name" id="shiorfor3_name" value="<x:out select="$xmlData/data/proposal/shiorfor3_name" />"  />
		</td>
	</tr>
	<tr>
		<td align="center" style="padding-left: 20px"><span class="color_red">*</span>申请单位是否曾列入安徽省国际合作基地</td>
		<td align="center">
		<label> <input type="radio" class="do " id="advant_01" style="vertical-align: middle;" name="shiorfor4" label="是" value="01" /><span style="vertical-align: middle;">是</span></label> 
	    <label> <input type="radio" class="do " id="advant_02" style="vertical-align: middle;" name="shiorfor4" label="否" value="02" /><span style="vertical-align: middle;">否</span></label> 
	    <input type="hidden" name="proposal/shiorfor4_value" id="shiorfor4_value" class="required" value="<x:out select="$xmlData/data/proposal/shiorfor4_value" />" label="申请单位是否曾列入安徽省国际合作基地" /> 
	    <input type="hidden" name="proposal/shiorfor4_name" id="shiorfor4_name" value="<x:out select="$xmlData/data/proposal/shiorfor4_name" />"  />
		</td>
	</tr>
</table>
<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="org1">
	<tr>
		<td class="t_bar2" colspan="4">申请单位信息</td>
	</tr>
	<tr>
		<td width="20%" align="right" nowrap>单位名称：</td>
		<td width="33%">&nbsp;<span name="organizations/organization[0]/org_name"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_name" /></span></td>
		<td align="right" nowrap width="20%">单位负责人：</td>
		<td width="27%">
		<input type="hidden" name="organization_persons/person[0]@type" value="fuzeren"/>
		&nbsp;<span name="organization_persons/person[0]/cname"><x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/cname" /></span></td>
	</tr>
	<tr>
		<td width="20%" align="right" nowrap>通讯地址：</td>
		<td >&nbsp;<span name="organizations/organization[0]/address"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/address" /></span></td>
		<td align="right" nowrap>邮政编码：</td>
		<td >&nbsp;<span name="organizations/organization[0]/zip_code"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/zip_code" /></span></td>
	</tr>
	<tr>
		<td width="20%" align="right" nowrap>传真：</td>
		<td >&nbsp;<span name="organizations/organization[0]/fax"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/fax" /></span></td>
		<td align="right" nowrap>电话：</td>
		<td >&nbsp;<span name="organizations/organization[0]/org_tel"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_tel" /></span></td>
	</tr>
</table>
<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="org2">
	<tr>
		<td    class="t_bar2" colspan="4">外方合作单位信息</td>
	</tr>
	<tr>
		<td align="right" width="20%"><span class="color_red" id="color1" style="display:none">*</span>单位名称：</td>
		<td colspan="3">
		<input  name="proposal/org_name" label="外方合作单位信息->单位名称" type="text" required class="input_css " onchange="cydw('org2');"  style="width: 725px;"  maxlength="100" value="<x:out select="$xmlData/data/proposal/org_name" />"/>
		</td>
	</tr>
	<tr>
	    <td align="right" width="20%"><span class="color_red" id="color4" style="display:none">*</span>项目联系人：</td>
	   <td width="33%"><input  name="proposal/contact_name" label="外方合作单位信息->项目联系人" type="text"  required class="input_css "  onchange="cydw('org2');" maxlength="20" value="<x:out select="$xmlData/data/proposal/contact_name" />"/></td>
		<td align="right" width="20%"><span class="color_red" id="color2" style="display:none">*</span>通讯地址：</td>
		<td width="27%"><input  name="proposal/address2" label="外方合作单位信息->通讯地址" type="text" required class="input_css " onchange="cydw('org2');" maxlength="100" value="<x:out select="$xmlData/data/proposal/address2" />"/></td>
	</tr>
	<%-- <tr>
	<td width="20%" align="right"><span class="color_red" id="color3" style="display:none">*</span>注册类型：</td>
          <td width="30%" align="left" colspan="1" >
          	<c:set var="nature2">{'id':'<x:out select="$xmlData/data/proposal/nature2_code" />','name':'<x:out select="$xmlData/data/proposal/nature2_name" />'}</c:set>
          	<cpt:tree key="nature_type" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${nature2}" label="合作单位信息2-->注册类型"
          		id="nature2" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2"/>
	        <input id="nature2_code" type="hidden" name="proposal/nature2_code"  class="" label="合作单位信息2-->注册类型" value="<x:out select="$xmlData/data/proposal/nature2_code" />"/>
            <input id="nature2_name" type="hidden" name="proposal/nature2_name"  value="<x:out select="$xmlData/data/proposal/nature2_name" />"/>
          </td>
	<td align="right" width="20%" ><span class="color_red" id="color4" style="display:none">*</span>组织机构代码：</td>
	<td width="30%" ><input  name="proposal/org_no2" label="合作单位信息2-->组织机构代码" type="text"  class="input_css orgCard" onchange="cydw('org2');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/org_no2" />"/></td>
	</tr> --%>
	<tr>
	<td align="right"><span class="color_red" id="color5" style="display:none">*</span>传真：</td>
	<td><input  name="proposal/portraiture2" label="外方合作单位信息->传真" type="text"  class="input_css "  onchange="cydw('org2');" maxlength="20" value="<x:out select="$xmlData/data/proposal/portraiture2" />"/></td>
	<td align="right" width="120px;"><span class="color_red" id="color6" style="display:none">*</span>电话：</td>
	<td><input  name="proposal/lxr_tel2" label="外方合作单位信息->电话" type="text"  class="input_css " onchange="cydw('org2');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/lxr_tel2" />"/></td>
	</tr>
</table>
<table  id="tblCooperation" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
			<thead >
					<tr style="border:1px solid #B7D1E6">
						<th class="TblHead" align="center"  width="4%">选择</th>
						<th class="TblHead" align="center"  width="4%">序号</th>
						<th class="TblHead" align="center"  width="9%">合作开始日期</th>
						<th class="TblHead" align="center"  width="9%">合作结束日期</th>
						<th class="TblHead" align="center"  width="4%">合作国别</th> 
						<th class="TblHead" align="center"  width="9%">合作机构名称</th>
					</tr>
			</thead>
			<tbody id="tab">
					<tr style="display:none"  align="center">
						<td align="center">&nbsp;
							<input type="radio" class="radiobutton" name="selCooperation" >
						</td>
						<td align="center">&nbsp;
							<span name="cooperations|cooperation[0]@seq_no" >[index]</span> 
						</td>
						<td align="center">&nbsp;
							<input  id="cooperation_start_date_[0]" name="cooperations|cooperation[0]|start_date" label="合作开始日期"value="" class=" required input_text date  dateCompare:cooperation_end_date_[0] dateCompareAfterE:cooperation_start_date_[0]:start_date" style="width:70px" label="合作开始日期" />
						</td>
						<td align="center">&nbsp;<input  id="cooperation_end_date_[0]" name="cooperations|cooperation[0]|end_date" label="合作结束日期" value="" class=" required input_text date dateCompareBeforeE:cooperation_end_date_[0]:end_date " style="width:70px" label="合作结束日期" /> </td> 
						<td align="center">&nbsp;						
							<cpt:select id="region[index]"  name="country" key="country" onChange="initControlValue(this.id)"></cpt:select>
							<input type="hidden" name="cooperations|cooperation[0]|country_value" value="" label="合作国别"  class="required"/>
							<input type="hidden" name="cooperations|cooperation[0]|country_name" value="" label="合作国别"  />
						</td>
						<td align="center">&nbsp;
						<input type="text" name="cooperations|cooperation[0]|frameworkname" label="合作机构名称"  maxlength="50" style="width:80%" class="required input_text"/>
						</td>
					</tr>
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/cooperations/cooperation" var="cooperation">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr   align="center">
						<td>&nbsp;
							<input type="radio" class="radiobutton" name="selCooperation" >
						</td>
						<td align="center">
							<span   name="cooperations/cooperation[${flag}${index}]@seq_no" ><x:out select="$cooperation/@seq_no"/></span> 
						</td>
						<td align="center">&nbsp;
							<c:set var="start_date" scope="page"><x:out select="$cooperation/start_date"/></c:set>
							<input  id="cooperation_start_date_[${flag}${index}]" value="${start_date}" label="合作开始日期" name="cooperations/cooperation[${flag}${index}]/start_date" class="required date input_text dateCompare:cooperation_end_date_[${flag}${index}] dateCompareAfterE:cooperation_start_date_[${flag}${index}]:start_date"  style="width:70px" label="合作开始日期" /> 
						</td>
						<td align="center">
							<c:set var="end_date" scope="page"><x:out select="$cooperation/end_date"/></c:set>
							<input  id="cooperation_end_date_[${flag}${index}]" name="cooperations/cooperation[${flag}${index}]/end_date" label="合作结束日期" value="${end_date}" class="required date input_text dateCompareBeforeE:cooperation_end_date_[${flag}${index}]:end_date" style="width:70px" label="合作结束日期" /> </td> 
						<td align="center">&nbsp;						
						    <c:set var="country_value"><x:out select="$cooperation/country_value" /></c:set>
							<cpt:select id="region${index}" name="country" value="${country_value }" key="country" onChange="initControlValue(this.id)" ></cpt:select>
							<input type="hidden" name="cooperations/cooperation[${flag}${index}]/country_value" value="<x:out select="$cooperation/country_value" />" label="合作国别"  class="required"/>
							<input type="hidden" name="cooperations/cooperation[${flag}${index}]/country_name" label="合作国别" value="<x:out select="$cooperation/country_name" />" />
						</td>
						<td align="center">&nbsp;
						   <input type="text" name="cooperations/cooperation[${flag}${index}]/frameworkname"   label="合作机构名称"   style="width:80%" maxlength="50"  class="required input_text" value="<x:out select="$cooperation/frameworkname" />"/>
						</td>
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
					<script type="text/javascript">
						showAllDateTag("tblCooperation");
					</script>
				</tbody>
				
					</table>
					<table width="98%" align="center">
					<tr><td>
					<input class="button" name="cmdAddbefore2" type=button value="添加" onclick="if(checkTabLimit('tblCooperation',8,'项目合作信息最多只能填写8条')){addNewRow('tblCooperation');showDateTag('tblCooperation');}try{top.resizeFrame();}catch(e){};">
					<input class="button" name="cmdMovePrev2" type=button value="上移" onclick="movePrev('tblCooperation','selCooperation')">
					<input class="button" name="cmdMoveNext2" type=button value="下移" onclick="moveNext('tblCooperation','selCooperation')">
					<input class="button" name="cmddel2" type=button  value="删除" onclick="deleteSelectedRow('tblCooperation','项目合作信息')">
					</td></tr>
	</table>

<div class="t_bar"><span class="color_red" >*</span>协议签署情况</div>
<table  id="tblAgreement" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
			<thead >
					<tr style="border:1px solid #B7D1E6">
						<th class="TblHead" align="center"  width="4%">选择</th>
						<th class="TblHead" align="center"  width="4%">序号</th>
						<th class="TblHead" align="center"  width="9%">协议名称</th> 
						<th class="TblHead" align="center"  width="9%">签订时间</th>  
				      <th class="TblHead" align="center"  width="9%">合作对象</th> 
						<th class="TblHead" align="center"  width="9%">备注</th>         
					</tr>
			</thead>
			<tbody id="tab">
					<tr style="display:none" align="center">
						<td align="center">&nbsp;
							<input type="radio" class="radiobutton" name="selAgreement" >
						</td>
						<td align="center">&nbsp;
							<span name="agreements|list[0]@seq_no" >[index]</span> 
						</td>
						<td align="center">
							<input type="text" name="agreements|list[0]|protocolname" label="协议名称" class="required input_text" maxlength="50" style="width:70px"/>
						</td>
						<!-- <td align="center">
							<input  id="agreements_start_date_[0]" name="agreements|list[0]|time" label="签订时间"value="" class=" required input_text date " style="width:70px" label="签订时间" />
						</td> -->
						
						<!-- <td align="center">
						<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
			<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date" label="申报日期"></cpt:date>
						
							<input  id="milestone_start_date_[0]" name="milestones|milestone[0]|start_date" label="签订时间"value="" class=" required input_text date  dateCompare:milestone_end_date_[0] dateCompareAfterE:milestone_start_date_[0]:start_date" style="width:70px" label="签订时间" />
						</td> -->
						<td align="center">
						   <input  id="agreements_date_[0]" name="agreements|list[0]|date" label="签订时间 " value="" class="required input_text date" style="width:70px"/>
						</td>
						<td align="center">
							<input type="text" name="agreements|list[0]|hzdx" label="合作对象"  class="required input_text"  maxlength="50" style="width:80%"/>
						</td> 
					
						<td align="center">
							<input type="text" name="agreements|list[0]|remarks" label="备注"  class="required input_text" maxlength="100" style="width:80%"/>
						</td> 
					</tr>				
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/agreements/list" var="list">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr align="center">
						<td align="center">&nbsp;
							<input type="radio" class="radiobutton" name="selAgreement" >
						</td>
						<td align="center">&nbsp;
							<span name="agreements/list[${flag}${index}]@seq_no" ><x:out select="$list/@seq_no"/></span> 
						</td>
						<td>
							<input type="text" name="agreements/list[${flag}${index}]/protocolname"  label="协议名称" style="width:70px"   class="required input_text" value="<x:out select="$list/protocolname" />" maxlength="50"/>
						</td>
						<td align="center">
							<c:set var="date" scope="page"><x:out select="$list/date"/></c:set>
							<input  id="milestone_date_[${flag}${index}]" value="${date}" label="签订时间" name="agreements/list[${flag}${index}]/date" class="required date"  style="width:70px" /> 
						</td>
						<td >
							<input type="text" name="agreements/list[${flag}${index}]/hzdx"  label="合作对象"   style="width:80%"  class="required input_text" value="<x:out select="$list/hzdx" />"  maxlength="50"/>
						</td> 
						
						<td>
							<input type="text" name="agreements/list[${flag}${index}]/remarks"  label="备注"  style="width:80%"   class="required input_text" value="<x:out select="$list/remarks" />" maxlength="50"/>
						</td> 
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
					<script type="text/javascript">
						showAllDateTag("tblAgreement");
					</script>
	   </tbody>
				</table>
					<table width="98%" align="center" border="0">
					<tr><td>
					<input class="button" name="cmdAddbefore" type=button value="添加" onclick="addNewRow('tblAgreement');showDateTag('tblAgreement');try{top.resizeFrame();}catch(e){};">
					<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('tblAgreement','selAgreement')">
					<input class="button" name="cmdMoveNext" type=button value="下移" onclick="moveNext('tblAgreement','selAgreement')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tblAgreement','协议签署情况');">
					</td></tr>
				</table>

<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="message">
<tr>
		<td    class="t_bar2" colspan="8">人员信息</td>
	</tr>
<tr>
		<td  align="right" ><span class="color_red">*</span>项目联系人：</td>
		<td  >
			<input size="12"  name="proposal/contact_psn_cname" label="项目联系人" type="text" required class="input_css required"   maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>联系电话：</td>
		<td  >
			<input  name="proposal/contact_psn_tel" label="联系电话" type="text" required class="input_css required"   maxlength="50" value="<x:out select="$xmlData/data/proposal/contact_psn_tel" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>联系手机：</td>
		<td  >
			<input  name="proposal/contact_psn_mobile" label="联系手机" type="text" required maxlength="11" required class="input_css required mobile"   maxlength="20" value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>电子邮箱：</td>
		<td  >
			<input  name="proposal/contact_psn_email" label="电子邮箱" type="text" required class="input_css required email"   maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_email" />"/> 
		</td>
	</tr>
	<tr>
		<td  align="right">项目负责人：</td>
		<td>
		    <span name="proposal/fzr_psnname" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" /></span>
		</td>
		<td  align="right">联系电话：</td>
		<td  >
		<span name="proposal/fzr_tel" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" /></span>
		</td>
		<td  align="right">联系手机：</td>
		<td  >
		<span name="proposal/fzr_mobile" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" /></span>
		</td>
		<td  align="right">电子邮箱：</td>
		<td  >
		<span name="proposal/fzr_mail"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" /></span>
		</td>
	</tr> 
</table>
<script type="text/javascript">
/* $(function() {
	$("#tblCooperation tr:even").addClass("li_1");
	$("#tblCooperation tr:odd").addClass("li_2");
	$("#tblAgreement tr:even").addClass("li_1");
	$("#tblAgreement tr:odd").addClass("li_2");
}); */
$(function(){
	cydw('org1');
	cydw('org2');
	cydw('org3');
})
function cydw(id){
	var count =0 ;
	$("#"+id).find("input[type='text']").each(function(){
		if($.trim($(this).val()) != ''){
			count +=1;
		}
	});
	if(count != 0){
		$("#"+id).find("input[type='text']").each(function(){
			$(this).addClass("required");
		});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','');
		});
	}else{
		$("#"+id).find("input[type='text']").each(function(){
			$(this).removeClass("required");
	});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','none');
		});
	}
}

function setProjectPlace(op){
	var address = $("#address_value").val();
	if(op) address = '${address}';
	$("#address_name_other").removeClass("required");
	if(address == '02'){
		$("#address_name_other_span").show();
		$("#address_name_other").css("display","");
		$("#address_name_other").addClass("required");
	}else{
		$("#address_name_other_span").hide();
		$("#address_name_other").removeClass("required");
		$("#address_name_other").val("");
	}
}
function initTreeValue2CallBack(){
	cydw('org1');
	cydw('org2');
	cydw('org3');
}
function setEmptyValueForTree(id){
	$("#"+id).val("");
	$("#"+id+"_hideId").val("");
	$("#"+id+"_hideName").val("");
	$("#"+id+"_code").val("");
	$("#"+id+"_value").val("");
	$("#"+id+"_name").val("");
	$("#"+id + ",[name$='/"+id+"_code']" + ",[name$='/"+id+"_name'],[name$='/"+id+"_value']").val("");
	$("#sqdm").val("");
	cydw('org1');
	cydw('org2');
	cydw('org3');
}

</script>

